package com.css.zfzx.sjcj.modules.app.controller;

import com.alibaba.fastjson.JSONObject;
import com.css.bpm.platform.base.response.RestResponse;
import com.css.zfzx.sjcj.modules.app.service.HddcAppFormService;
import com.css.zfzx.sjcj.modules.app.vo.HddcFormDataInfoVo;
import com.css.zfzx.sjcj.modules.hddcwyCrater.repository.entity.HddcWyCraterEntity;
import com.css.zfzx.sjcj.modules.hddcwyCrater.service.HddcWyCraterService;
import com.css.zfzx.sjcj.modules.hddcwyDrillHole.repository.entity.HddcWyDrillholeEntity;
import com.css.zfzx.sjcj.modules.hddcwyDrillHole.service.HddcWyDrillholeService;
import com.css.zfzx.sjcj.modules.hddcwyFaultSvyPoint.repository.entity.HddcWyFaultsvypointEntity;
import com.css.zfzx.sjcj.modules.hddcwyFaultSvyPoint.service.HddcWyFaultsvypointService;
import com.css.zfzx.sjcj.modules.hddcwyGeoGeomorphySvyPoint.repository.entity.HddcWyGeogeomorphysvypointEntity;
import com.css.zfzx.sjcj.modules.hddcwyGeoGeomorphySvyPoint.service.HddcWyGeogeomorphysvypointService;
import com.css.zfzx.sjcj.modules.hddcwyGeochemicalSvyLine.repository.entity.HddcWyGeochemicalsvylineEntity;
import com.css.zfzx.sjcj.modules.hddcwyGeochemicalSvyLine.service.HddcWyGeochemicalsvylineService;
import com.css.zfzx.sjcj.modules.hddcwyGeochemicalSvyPoint.repository.entity.HddcWyGeochemicalsvypointEntity;
import com.css.zfzx.sjcj.modules.hddcwyGeochemicalSvyPoint.service.HddcWyGeochemicalsvypointService;
import com.css.zfzx.sjcj.modules.hddcwyGeologicalSvyLine.repository.entity.HddcWyGeologicalsvylineEntity;
import com.css.zfzx.sjcj.modules.hddcwyGeologicalSvyLine.service.HddcWyGeologicalsvylineService;
import com.css.zfzx.sjcj.modules.hddcwyGeologicalSvyPlanningLine.repository.entity.HddcWyGeologicalsvyplanninglineEntity;
import com.css.zfzx.sjcj.modules.hddcwyGeologicalSvyPlanningLine.service.HddcWyGeologicalsvyplanninglineService;
import com.css.zfzx.sjcj.modules.hddcwyGeologicalSvyPlanningPt.repository.entity.HddcWyGeologicalsvyplanningptEntity;
import com.css.zfzx.sjcj.modules.hddcwyGeologicalSvyPlanningPt.service.HddcWyGeologicalsvyplanningptService;
import com.css.zfzx.sjcj.modules.hddcwyGeologicalSvyPoint.repository.entity.HddcWyGeologicalsvypointEntity;
import com.css.zfzx.sjcj.modules.hddcwyGeologicalSvyPoint.service.HddcWyGeologicalsvypointService;
import com.css.zfzx.sjcj.modules.hddcwyGeomorStation.repository.entity.HddcWyGeomorstationEntity;
import com.css.zfzx.sjcj.modules.hddcwyGeomorStation.service.HddcWyGeomorstationService;
import com.css.zfzx.sjcj.modules.hddcwyGeomorphySvyLine.repository.entity.HddcWyGeomorphysvylineEntity;
import com.css.zfzx.sjcj.modules.hddcwyGeomorphySvyLine.service.HddcWyGeomorphysvylineService;
import com.css.zfzx.sjcj.modules.hddcwyGeomorphySvyPoint.repository.entity.HddcWyGeomorphysvypointEntity;
import com.css.zfzx.sjcj.modules.hddcwyGeomorphySvyPoint.service.HddcWyGeomorphysvypointService;
import com.css.zfzx.sjcj.modules.hddcwyGeomorphySvyReProf.repository.entity.HddcWyGeomorphysvyreprofEntity;
import com.css.zfzx.sjcj.modules.hddcwyGeomorphySvyReProf.service.HddcWyGeomorphysvyreprofService;
import com.css.zfzx.sjcj.modules.hddcwyGeomorphySvyRegion.repository.entity.HddcWyGeomorphysvyregionEntity;
import com.css.zfzx.sjcj.modules.hddcwyGeomorphySvyRegion.service.HddcWyGeomorphysvyregionService;
import com.css.zfzx.sjcj.modules.hddcwyGeomorphySvySamplePoint.repository.entity.HddcWyGeomorphysvysamplepointEntity;
import com.css.zfzx.sjcj.modules.hddcwyGeomorphySvySamplePoint.service.HddcWyGeomorphysvysamplepointService;
import com.css.zfzx.sjcj.modules.hddcwyGeophySvyLine.repository.entity.HddcWyGeophysvylineEntity;
import com.css.zfzx.sjcj.modules.hddcwyGeophySvyLine.service.HddcWyGeophysvylineService;
import com.css.zfzx.sjcj.modules.hddcwyGeophysvypoint.repository.entity.HddcWyGeophysvypointEntity;
import com.css.zfzx.sjcj.modules.hddcwyGeophysvypoint.service.HddcWyGeophysvypointService;
import com.css.zfzx.sjcj.modules.hddcwyLava.repository.entity.HddcWyLavaEntity;
import com.css.zfzx.sjcj.modules.hddcwyLava.service.HddcWyLavaService;
import com.css.zfzx.sjcj.modules.hddcwySamplePoint.repository.entity.HddcWySamplepointEntity;
import com.css.zfzx.sjcj.modules.hddcwySamplePoint.service.HddcWySamplepointService;
import com.css.zfzx.sjcj.modules.hddcwyStratigraphySvyPoint.repository.entity.HddcWyStratigraphysvypointEntity;
import com.css.zfzx.sjcj.modules.hddcwyStratigraphySvyPoint.service.HddcWyStratigraphysvypointService;
import com.css.zfzx.sjcj.modules.hddcwyTrench.repository.entity.HddcWyTrenchEntity;
import com.css.zfzx.sjcj.modules.hddcwyTrench.service.HddcWyTrenchService;
import com.css.zfzx.sjcj.modules.hddcwyVolcanicSamplePoint.repository.entity.HddcWyVolcanicsamplepointEntity;
import com.css.zfzx.sjcj.modules.hddcwyVolcanicSamplePoint.service.HddcWyVolcanicsamplepointService;
import com.css.zfzx.sjcj.modules.hddcwyVolcanicSvyPoint.repository.entity.HddcWyVolcanicsvypointEntity;
import com.css.zfzx.sjcj.modules.hddcwyVolcanicSvyPoint.service.HddcWyVolcanicsvypointService;
import io.swagger.models.auth.In;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import java.util.ArrayList;
import java.util.List;

/**
 * TODO
 *
 * @author 王昊杰
 * @version 1.0
 * @date 2020/12/10  14:58
 */

@Slf4j
@RestController
@RequestMapping("/hddcAppForminfo")
public class HddcAppFormControlller {
    @Autowired
    private HddcAppFormService hddcAppFormService;
    @Autowired
    private HddcWyGeologicalsvyplanninglineService hddcWyGeologicalsvyplanninglineService;
    @Autowired
    private HddcWyGeologicalsvyplanningptService hddcWyGeologicalsvyplanningptService;
    @Autowired
    private HddcWyFaultsvypointService hddcWyFaultsvypointService;
    @Autowired
    private HddcWyGeogeomorphysvypointService hddcWyGeogeomorphysvypointService;
    @Autowired
    private HddcWyGeologicalsvylineService hddcWyGeologicalsvylineService;
    @Autowired
    private HddcWyGeologicalsvypointService hddcWyGeologicalsvypointService;
    @Autowired
    private HddcWyStratigraphysvypointService hddcWyStratigraphysvypointService;
    @Autowired
    private HddcWyTrenchService hddcWyTrenchService;
    @Autowired
    private HddcWyGeomorphysvylineService hddcWyGeomorphysvylineService;
    @Autowired
    private HddcWyGeomorphysvypointService hddcWyGeomorphysvypointService;
    @Autowired
    private HddcWyGeomorphysvyregionService hddcWyGeomorphysvyregionService;
    @Autowired
    private HddcWyGeomorphysvyreprofService hddcWyGeomorphysvyreprofService;
    @Autowired
    private HddcWyGeomorphysvysamplepointService hddcWyGeomorphysvysamplepointService;
    @Autowired
    private HddcWyGeomorstationService hddcWyGeomorstationService;
    @Autowired
    private HddcWyDrillholeService hddcWyDrillholeService;
    @Autowired
    private HddcWySamplepointService hddcWySamplepointService;
    @Autowired
    private HddcWyGeophysvylineService hddcWyGeophysvylineService;
    @Autowired
    private HddcWyGeophysvypointService hddcWyGeophysvypointService;
    @Autowired
    private HddcWyGeochemicalsvylineService hddcWyGeochemicalsvylineService;
    @Autowired
    private HddcWyGeochemicalsvypointService hddcWyGeochemicalsvypointService;
    @Autowired
    private HddcWyCraterService hddcWyCraterService;
    @Autowired
    private HddcWyLavaService hddcWyLavaService;
    @Autowired
    private HddcWyVolcanicsamplepointService hddcWyVolcanicsamplepointService;
    @Autowired
    private HddcWyVolcanicsvypointService hddcWyVolcanicsvypointService;

    /**
     * 查询表单列表
     *
     * @param userId
     * @param taskId
     * @param projectId
     * @param type
     * @return
     */
    @GetMapping("/findAppFormData")
    public RestResponse findAppFormData(String userId, String taskId, String projectId, String type) {

        RestResponse response = null;
        try {
            if ("1".equals(type)) {
                List<HddcWyGeologicalsvyplanninglineEntity> list = hddcWyGeologicalsvyplanninglineService.findAllByCreateUserAndTaskIdAndProjectIdAndIsValid(userId, taskId, projectId, "1");
                response = RestResponse.succeed(list);
            }
            if ("2".equals(type)) {
                List<HddcWyGeologicalsvyplanningptEntity> list = hddcWyGeologicalsvyplanningptService.findAllByCreateUserAndTaskIdAndProjectIdAndIsValid(userId, taskId, projectId, "1");
                response = RestResponse.succeed(list);
            }
            if ("3".equals(type)) {
                List<HddcWyFaultsvypointEntity> list = hddcWyFaultsvypointService.findAllByCreateUserAndTaskIdAndProjectIdAndIsValid(userId, taskId, projectId, "1");
                response = RestResponse.succeed(list);
            }
            if ("4".equals(type)) {
                List<HddcWyGeogeomorphysvypointEntity> list = hddcWyGeogeomorphysvypointService.findAllByCreateUserAndTaskIdAndProjectIdAndIsValid(userId, taskId, projectId, "1");
                response = RestResponse.succeed(list);
            }
            if ("5".equals(type)) {
                List<HddcWyGeologicalsvylineEntity> list = hddcWyGeologicalsvylineService.findAllByCreateUserAndTaskIdAndProjectIdAndIsValid(userId, taskId, projectId, "1");
                response = RestResponse.succeed(list);
            }
            if ("6".equals(type)) {
                List<HddcWyGeologicalsvypointEntity> list = hddcWyGeologicalsvypointService.findAllByCreateUserAndTaskIdAndProjectIdAndIsValid(userId, taskId, projectId, "1");
                response = RestResponse.succeed(list);
            }
            if ("7".equals(type)) {
                List<HddcWyStratigraphysvypointEntity> list = hddcWyStratigraphysvypointService.findAllByCreateUserAndTaskIdAndProjectIdAndIsValid(userId, taskId, projectId, "1");
                response = RestResponse.succeed(list);
            }
            if ("8".equals(type)) {
                List<HddcWyTrenchEntity> list = hddcWyTrenchService.findAllByCreateUserAndTaskIdAndProjectIdAndIsValid(userId, taskId, projectId, "1");
                response = RestResponse.succeed(list);
            }
            if ("9".equals(type)) {
                List<HddcWyGeomorphysvylineEntity> list = hddcWyGeomorphysvylineService.findAllByCreateUserAndTaskIdAndProjectIdAndIsValid(userId, taskId, projectId, "1");
                response = RestResponse.succeed(list);
            }
            if ("10".equals(type)) {
                List<HddcWyGeomorphysvypointEntity> list = hddcWyGeomorphysvypointService.findAllByCreateUserAndTaskIdAndProjectIdAndIsValid(userId, taskId, projectId, "1");
                response = RestResponse.succeed(list);
            }
            if ("11".equals(type)) {
                List<HddcWyGeomorphysvyregionEntity> list = hddcWyGeomorphysvyregionService.findAllByCreateUserAndTaskIdAndProjectIdAndIsValid(userId, taskId, projectId, "1");
                response = RestResponse.succeed(list);
            }
            if ("12".equals(type)) {
                List<HddcWyGeomorphysvyreprofEntity> list = hddcWyGeomorphysvyreprofService.findAllByCreateUserAndTaskIdAndProjectIdAndIsValid(userId, taskId, projectId, "1");
                response = RestResponse.succeed(list);
            }
            if ("13".equals(type)) {
                List<HddcWyGeomorphysvysamplepointEntity> list = hddcWyGeomorphysvysamplepointService.findAllByCreateUserAndTaskIdAndProjectIdAndIsValid(userId, taskId, projectId, "1");
                response = RestResponse.succeed(list);
            }
            if ("14".equals(type)) {
                List<HddcWyGeomorstationEntity> list = hddcWyGeomorstationService.findAllByCreateUserAndTaskIdAndProjectIdAndIsValid(userId, taskId, projectId, "1");
                response = RestResponse.succeed(list);
            }
            if ("15".equals(type)) {
                List<HddcWyDrillholeEntity> list = hddcWyDrillholeService.findAllByCreateUserAndTaskIdAndProjectIdAndIsValid(userId, taskId, projectId, "1");
                response = RestResponse.succeed(list);
            }
            if ("16".equals(type)) {
                List<HddcWySamplepointEntity> list = hddcWySamplepointService.findAllByCreateUserAndTaskIdAndProjectIdAndIsValid(userId, taskId, projectId, "1");
                response = RestResponse.succeed(list);
            }
            if ("17".equals(type)) {
                List<HddcWyGeophysvylineEntity> list = hddcWyGeophysvylineService.findAllByCreateUserAndTaskIdAndProjectIdAndIsValid(userId, taskId, projectId, "1");
                response = RestResponse.succeed(list);
            }
            if ("18".equals(type)) {
                List<HddcWyGeophysvypointEntity> list = hddcWyGeophysvypointService.findAllByCreateUserAndTaskIdAndProjectIdAndIsValid(userId, taskId, projectId, "1");
                response = RestResponse.succeed(list);
            }
            if ("19".equals(type)) {
                List<HddcWyGeochemicalsvylineEntity> list = hddcWyGeochemicalsvylineService.findAllByCreateUserAndTaskIdAndProjectIdAndIsValid(userId, taskId, projectId, "1");
                response = RestResponse.succeed(list);
            }
            if ("20".equals(type)) {
                List<HddcWyGeochemicalsvypointEntity> list = hddcWyGeochemicalsvypointService.findAllByCreateUserAndTaskIdAndProjectIdAndIsValid(userId, taskId, projectId, "1");
                response = RestResponse.succeed(list);
            }
            if ("21".equals(type)) {
                List<HddcWyCraterEntity> list = hddcWyCraterService.findAllByCreateUserAndTaskIdAndProjectIdAndIsValid(userId, taskId, projectId, "1");
                response = RestResponse.succeed(list);
            }
            if ("22".equals(type)) {
                List<HddcWyLavaEntity> list = hddcWyLavaService.findAllByCreateUserAndTaskIdAndProjectIdAndIsValid(userId, taskId, projectId, "1");
                response = RestResponse.succeed(list);
            }
            if ("23".equals(type)) {
                List<HddcWyVolcanicsamplepointEntity> list = hddcWyVolcanicsamplepointService.findAllByCreateUserAndTaskIdAndProjectIdAndIsValid(userId, taskId, projectId, "1");
                response = RestResponse.succeed(list);
            }
            if ("24".equals(type)) {
                List<HddcWyVolcanicsvypointEntity> list = hddcWyVolcanicsvypointService.findAllByCreateUserAndTaskIdAndProjectIdAndIsValid(userId, taskId, projectId, "1");
                response = RestResponse.succeed(list);
            }
            return response;
        } catch (Exception e) {
            String errorMessage = "查询失败!";
            log.error(errorMessage, e);
            response = RestResponse.fail(errorMessage);
        }
        return response;
    }

    /**
     * 查询地图上所有的点
     *
     * @param userId
     * @return
     */
    @GetMapping("/findAppFormDataInfo")
    public RestResponse findAppFormDatainfo(String userId) {
        RestResponse response = null;
        List<HddcFormDataInfoVo> dataInfoVos = new ArrayList<>();
        try {
            List<HddcWyGeologicalsvyplanninglineEntity> list1 = hddcWyGeologicalsvyplanninglineService.findAllByCreateUserAndIsValid(userId, "1");
            if (list1.size() > 0) {
                for (HddcWyGeologicalsvyplanninglineEntity hddcWyGeologicalsvyplanninglineEntity : list1) {
                    HddcFormDataInfoVo hddcFormDataInfoVo = new HddcFormDataInfoVo();
                    hddcFormDataInfoVo.setUuid(hddcWyGeologicalsvyplanninglineEntity.getUuid());
                    hddcFormDataInfoVo.setLon(hddcWyGeologicalsvyplanninglineEntity.getLon());
                    hddcFormDataInfoVo.setLat(hddcWyGeologicalsvyplanninglineEntity.getLat());
                    hddcFormDataInfoVo.setType("1");
                    dataInfoVos.add(hddcFormDataInfoVo);
                }
                //response=RestResponse.succeed(dataInfoVos);
            }
            List<HddcWyGeologicalsvyplanningptEntity> list2 = hddcWyGeologicalsvyplanningptService.findAllByCreateUserAndIsValid(userId, "1");
            if (list2.size() > 0) {
                for (HddcWyGeologicalsvyplanningptEntity hddcWyGeologicalsvyplanningptEntity : list2) {
                    HddcFormDataInfoVo hddcFormDataInfoVo = new HddcFormDataInfoVo();
                    hddcFormDataInfoVo.setUuid(hddcWyGeologicalsvyplanningptEntity.getUuid());
                    hddcFormDataInfoVo.setLon(hddcWyGeologicalsvyplanningptEntity.getLon());
                    hddcFormDataInfoVo.setLat(hddcWyGeologicalsvyplanningptEntity.getLat());
                    hddcFormDataInfoVo.setType("2");
                    dataInfoVos.add(hddcFormDataInfoVo);
                }
                //response=RestResponse.succeed(dataInfoVos);
            }
            List<HddcWyFaultsvypointEntity> list3 = hddcWyFaultsvypointService.findAllByCreateUserAndIsValid(userId, "1");
            if (list3.size() > 0) {
                for (HddcWyFaultsvypointEntity hddcWyFaultsvypointEntity : list3) {
                    HddcFormDataInfoVo hddcFormDataInfoVo = new HddcFormDataInfoVo();
                    hddcFormDataInfoVo.setUuid(hddcWyFaultsvypointEntity.getUuid());
                    hddcFormDataInfoVo.setLon(hddcWyFaultsvypointEntity.getLon());
                    hddcFormDataInfoVo.setLat(hddcWyFaultsvypointEntity.getLat());
                    hddcFormDataInfoVo.setType("3");
                    dataInfoVos.add(hddcFormDataInfoVo);
                }
                //response=RestResponse.succeed(dataInfoVos);
            }
            List<HddcWyGeogeomorphysvypointEntity> list4 = hddcWyGeogeomorphysvypointService.findAllByCreateUserAndIsValid(userId, "1");
            if (list4.size() > 0) {
                for (HddcWyGeogeomorphysvypointEntity hddcWyGeogeomorphysvypointEntity : list4) {
                    HddcFormDataInfoVo hddcFormDataInfoVo = new HddcFormDataInfoVo();
                    hddcFormDataInfoVo.setUuid(hddcWyGeogeomorphysvypointEntity.getUuid());
                    hddcFormDataInfoVo.setLon(hddcWyGeogeomorphysvypointEntity.getLon());
                    hddcFormDataInfoVo.setLat(hddcWyGeogeomorphysvypointEntity.getLat());
                    hddcFormDataInfoVo.setType("4");
                    dataInfoVos.add(hddcFormDataInfoVo);
                }
                //response=RestResponse.succeed(dataInfoVos);
            }
            List<HddcWyGeologicalsvylineEntity> list5 = hddcWyGeologicalsvylineService.findAllByCreateUserAndIsValid(userId, "1");
            if (list5.size() > 0) {
                for (HddcWyGeologicalsvylineEntity hddcWyGeologicalsvylineEntity : list5) {
                    HddcFormDataInfoVo hddcFormDataInfoVo = new HddcFormDataInfoVo();
                    hddcFormDataInfoVo.setUuid(hddcWyGeologicalsvylineEntity.getUuid());
                    hddcFormDataInfoVo.setLon(hddcWyGeologicalsvylineEntity.getLon());
                    hddcFormDataInfoVo.setLat(hddcWyGeologicalsvylineEntity.getLat());
                    hddcFormDataInfoVo.setType("5");
                    dataInfoVos.add(hddcFormDataInfoVo);
                }
                //response=RestResponse.succeed(dataInfoVos);
            }
            List<HddcWyGeologicalsvypointEntity> list6 = hddcWyGeologicalsvypointService.findAllByCreateUserAndIsValid(userId, "1");
            if (list6.size() > 0) {
                for (HddcWyGeologicalsvypointEntity hddcWyGeologicalsvypointEntity : list6) {
                    HddcFormDataInfoVo hddcFormDataInfoVo = new HddcFormDataInfoVo();
                    hddcFormDataInfoVo.setUuid(hddcWyGeologicalsvypointEntity.getUuid());
                    hddcFormDataInfoVo.setLon(hddcWyGeologicalsvypointEntity.getLon());
                    hddcFormDataInfoVo.setLat(hddcWyGeologicalsvypointEntity.getLat());
                    hddcFormDataInfoVo.setType("6");
                    dataInfoVos.add(hddcFormDataInfoVo);
                }
                //response=RestResponse.succeed(dataInfoVos);
            }
            List<HddcWyStratigraphysvypointEntity> list7 = hddcWyStratigraphysvypointService.findAllByCreateUserAndIsValid(userId, "1");
            if (list7.size() > 0) {
                for (HddcWyStratigraphysvypointEntity hddcWyStratigraphysvypointEntity : list7) {
                    HddcFormDataInfoVo hddcFormDataInfoVo = new HddcFormDataInfoVo();
                    hddcFormDataInfoVo.setUuid(hddcWyStratigraphysvypointEntity.getUuid());
                    hddcFormDataInfoVo.setLon(hddcWyStratigraphysvypointEntity.getLon());
                    hddcFormDataInfoVo.setLat(hddcWyStratigraphysvypointEntity.getLat());
                    hddcFormDataInfoVo.setType("7");
                    dataInfoVos.add(hddcFormDataInfoVo);
                }
                //response=RestResponse.succeed(dataInfoVos);
            }
            List<HddcWyTrenchEntity> list8 = hddcWyTrenchService.findAllByCreateUserAndIsValid(userId, "1");
            if (list8.size() > 0) {
                for (HddcWyTrenchEntity hddcWyTrenchEntity : list8) {
                    HddcFormDataInfoVo hddcFormDataInfoVo = new HddcFormDataInfoVo();
                    hddcFormDataInfoVo.setUuid(hddcWyTrenchEntity.getUuid());
                    hddcFormDataInfoVo.setLon(hddcWyTrenchEntity.getLon());
                    hddcFormDataInfoVo.setLat(hddcWyTrenchEntity.getLat());
                    hddcFormDataInfoVo.setType("8");
                    dataInfoVos.add(hddcFormDataInfoVo);
                }
                //response=RestResponse.succeed(dataInfoVos);
            }
            List<HddcWyGeomorphysvylineEntity> list9 = hddcWyGeomorphysvylineService.findAllByCreateUserAndIsValid(userId, "1");
            if (list9.size() > 0) {
                for (HddcWyGeomorphysvylineEntity hddcWyGeomorphysvylineEntity : list9) {
                    HddcFormDataInfoVo hddcFormDataInfoVo = new HddcFormDataInfoVo();
                    hddcFormDataInfoVo.setUuid(hddcWyGeomorphysvylineEntity.getUuid());
                    hddcFormDataInfoVo.setLon(hddcWyGeomorphysvylineEntity.getLon());
                    hddcFormDataInfoVo.setLat(hddcWyGeomorphysvylineEntity.getLat());
                    hddcFormDataInfoVo.setType("9");
                    dataInfoVos.add(hddcFormDataInfoVo);
                }
                //response=RestResponse.succeed(dataInfoVos);
            }
            List<HddcWyGeomorphysvypointEntity> list10 = hddcWyGeomorphysvypointService.findAllByCreateUserAndIsValid(userId, "1");
            if (list10.size() > 0) {
                for (HddcWyGeomorphysvypointEntity hddcWyGeomorphysvypointEntity : list10) {
                    HddcFormDataInfoVo hddcFormDataInfoVo = new HddcFormDataInfoVo();
                    hddcFormDataInfoVo.setUuid(hddcWyGeomorphysvypointEntity.getUuid());
                    hddcFormDataInfoVo.setLon(hddcWyGeomorphysvypointEntity.getLon());
                    hddcFormDataInfoVo.setLat(hddcWyGeomorphysvypointEntity.getLat());
                    hddcFormDataInfoVo.setType("10");
                    dataInfoVos.add(hddcFormDataInfoVo);
                }
                //response=RestResponse.succeed(dataInfoVos);
            }
            List<HddcWyGeomorphysvyregionEntity> list11 = hddcWyGeomorphysvyregionService.findAllByCreateUserAndIsValid(userId, "1");
            if (list11.size() > 0) {
                for (HddcWyGeomorphysvyregionEntity hddcWyGeomorphysvyregionEntity : list11) {
                    HddcFormDataInfoVo hddcFormDataInfoVo = new HddcFormDataInfoVo();
                    hddcFormDataInfoVo.setUuid(hddcWyGeomorphysvyregionEntity.getUuid());
                    hddcFormDataInfoVo.setLon(hddcWyGeomorphysvyregionEntity.getLon());
                    hddcFormDataInfoVo.setLat(hddcWyGeomorphysvyregionEntity.getLat());
                    hddcFormDataInfoVo.setType("11");
                    dataInfoVos.add(hddcFormDataInfoVo);
                }
                //response=RestResponse.succeed(dataInfoVos);
            }
            List<HddcWyGeomorphysvyreprofEntity> list12 = hddcWyGeomorphysvyreprofService.findAllByCreateUserAndIsValid(userId, "1");
            if (list12.size() > 0) {
                for (HddcWyGeomorphysvyreprofEntity hddcWyGeomorphysvyreprofEntity : list12) {
                    HddcFormDataInfoVo hddcFormDataInfoVo = new HddcFormDataInfoVo();
                    hddcFormDataInfoVo.setUuid(hddcWyGeomorphysvyreprofEntity.getUuid());
                    hddcFormDataInfoVo.setLon(hddcWyGeomorphysvyreprofEntity.getLon());
                    hddcFormDataInfoVo.setLat(hddcWyGeomorphysvyreprofEntity.getLat());
                    hddcFormDataInfoVo.setType("12");
                    dataInfoVos.add(hddcFormDataInfoVo);
                }
                //response=RestResponse.succeed(dataInfoVos);
            }
            List<HddcWyGeomorphysvysamplepointEntity> list13 = hddcWyGeomorphysvysamplepointService.findAllByCreateUserAndIsValid(userId, "1");
            if (list13.size() > 0) {
                for (HddcWyGeomorphysvysamplepointEntity hddcWyGeomorphysvysamplepointEntity : list13) {
                    HddcFormDataInfoVo hddcFormDataInfoVo = new HddcFormDataInfoVo();
                    hddcFormDataInfoVo.setUuid(hddcWyGeomorphysvysamplepointEntity.getUuid());
                    hddcFormDataInfoVo.setLon(hddcWyGeomorphysvysamplepointEntity.getLon());
                    hddcFormDataInfoVo.setLat(hddcWyGeomorphysvysamplepointEntity.getLat());
                    hddcFormDataInfoVo.setType("13");
                    dataInfoVos.add(hddcFormDataInfoVo);
                }
                //response=RestResponse.succeed(dataInfoVos);
            }
            List<HddcWyGeomorstationEntity> list14 = hddcWyGeomorstationService.findAllByCreateUserAndIsValid(userId, "1");
            if (list14.size() > 0) {
                for (HddcWyGeomorstationEntity hddcWyGeomorstationEntity : list14) {
                    HddcFormDataInfoVo hddcFormDataInfoVo = new HddcFormDataInfoVo();
                    hddcFormDataInfoVo.setUuid(hddcWyGeomorstationEntity.getUuid());
                    hddcFormDataInfoVo.setLon(hddcWyGeomorstationEntity.getLon());
                    hddcFormDataInfoVo.setLat(hddcWyGeomorstationEntity.getLat());
                    hddcFormDataInfoVo.setType("14");
                    dataInfoVos.add(hddcFormDataInfoVo);
                }
                //response=RestResponse.succeed(dataInfoVos);
            }
            List<HddcWyDrillholeEntity> list15 = hddcWyDrillholeService.findAllByCreateUserAndIsValid(userId, "1");
            if (list15.size() > 0) {
                for (HddcWyDrillholeEntity hddcWyDrillholeEntity : list15) {
                    HddcFormDataInfoVo hddcFormDataInfoVo = new HddcFormDataInfoVo();
                    hddcFormDataInfoVo.setUuid(hddcWyDrillholeEntity.getUuid());
                    hddcFormDataInfoVo.setLon(hddcWyDrillholeEntity.getLon());
                    hddcFormDataInfoVo.setLat(hddcWyDrillholeEntity.getLat());
                    hddcFormDataInfoVo.setType("15");
                    dataInfoVos.add(hddcFormDataInfoVo);
                }
                //response=RestResponse.succeed(dataInfoVos);
            }
            List<HddcWySamplepointEntity> list16 = hddcWySamplepointService.findAllByCreateUserAndIsValid(userId, "1");
            if (list16.size() > 0) {
                for (HddcWySamplepointEntity hddcWySamplepointEntity : list16) {
                    HddcFormDataInfoVo hddcFormDataInfoVo = new HddcFormDataInfoVo();
                    hddcFormDataInfoVo.setUuid(hddcWySamplepointEntity.getUuid());
                    hddcFormDataInfoVo.setLon(hddcWySamplepointEntity.getLon());
                    hddcFormDataInfoVo.setLat(hddcWySamplepointEntity.getLat());
                    hddcFormDataInfoVo.setType("16");
                    dataInfoVos.add(hddcFormDataInfoVo);
                }
                //response=RestResponse.succeed(dataInfoVos);
            }
            List<HddcWyGeophysvylineEntity> list17 = hddcWyGeophysvylineService.findAllByCreateUserAndIsValid(userId, "1");
            if (list17.size() > 0) {
                for (HddcWyGeophysvylineEntity hddcWyGeophysvylineEntity : list17) {
                    HddcFormDataInfoVo hddcFormDataInfoVo = new HddcFormDataInfoVo();
                    hddcFormDataInfoVo.setUuid(hddcWyGeophysvylineEntity.getUuid());
                    hddcFormDataInfoVo.setLon(hddcWyGeophysvylineEntity.getLon());
                    hddcFormDataInfoVo.setLat(hddcWyGeophysvylineEntity.getLat());
                    hddcFormDataInfoVo.setType("17");
                    dataInfoVos.add(hddcFormDataInfoVo);
                }
                //response=RestResponse.succeed(dataInfoVos);
            }
            List<HddcWyGeophysvypointEntity> list18 = hddcWyGeophysvypointService.findAllByCreateUserAndIsValid(userId, "1");
            if (list18.size() > 0) {
                for (HddcWyGeophysvypointEntity hddcWyGeophysvypointEntity : list18) {
                    HddcFormDataInfoVo hddcFormDataInfoVo = new HddcFormDataInfoVo();
                    hddcFormDataInfoVo.setUuid(hddcWyGeophysvypointEntity.getUuid());
                    hddcFormDataInfoVo.setLon(hddcWyGeophysvypointEntity.getLon());
                    hddcFormDataInfoVo.setLat(hddcWyGeophysvypointEntity.getLat());
                    hddcFormDataInfoVo.setType("18");
                    dataInfoVos.add(hddcFormDataInfoVo);
                }
                //response=RestResponse.succeed(dataInfoVos);
            }
            List<HddcWyGeochemicalsvylineEntity> list19 = hddcWyGeochemicalsvylineService.findAllByCreateUserAndIsValid(userId, "1");
            if (list19.size() > 0) {
                for (HddcWyGeochemicalsvylineEntity hddcWyGeochemicalsvylineEntity : list19) {
                    HddcFormDataInfoVo hddcFormDataInfoVo = new HddcFormDataInfoVo();
                    hddcFormDataInfoVo.setUuid(hddcWyGeochemicalsvylineEntity.getUuid());
                    hddcFormDataInfoVo.setLon(hddcWyGeochemicalsvylineEntity.getLon());
                    hddcFormDataInfoVo.setLat(hddcWyGeochemicalsvylineEntity.getLat());
                    hddcFormDataInfoVo.setType("19");
                    dataInfoVos.add(hddcFormDataInfoVo);
                }
                //response=RestResponse.succeed(dataInfoVos);
            }
            List<HddcWyGeochemicalsvypointEntity> list20 = hddcWyGeochemicalsvypointService.findAllByCreateUserAndIsValid(userId, "1");
            if (list20.size() > 0) {
                for (HddcWyGeochemicalsvypointEntity hddcWyGeochemicalsvypointEntity : list20) {
                    HddcFormDataInfoVo hddcFormDataInfoVo = new HddcFormDataInfoVo();
                    hddcFormDataInfoVo.setUuid(hddcWyGeochemicalsvypointEntity.getUuid());
                    hddcFormDataInfoVo.setLon(hddcWyGeochemicalsvypointEntity.getLon());
                    hddcFormDataInfoVo.setLat(hddcWyGeochemicalsvypointEntity.getLat());
                    hddcFormDataInfoVo.setType("20");
                    dataInfoVos.add(hddcFormDataInfoVo);
                }
                //response=RestResponse.succeed(dataInfoVos);
            }
            List<HddcWyCraterEntity> list21 = hddcWyCraterService.findAllByCreateUserAndIsValid(userId, "1");
            if (list21.size() > 0) {
                for (HddcWyCraterEntity hddcWyCraterEntity : list21) {
                    HddcFormDataInfoVo hddcFormDataInfoVo = new HddcFormDataInfoVo();
                    hddcFormDataInfoVo.setUuid(hddcWyCraterEntity.getUuid());
                    hddcFormDataInfoVo.setLon(hddcWyCraterEntity.getLon());
                    hddcFormDataInfoVo.setLat(hddcWyCraterEntity.getLat());
                    hddcFormDataInfoVo.setType("21");
                    dataInfoVos.add(hddcFormDataInfoVo);
                }
                //response=RestResponse.succeed(dataInfoVos);
            }
            List<HddcWyLavaEntity> list22 = hddcWyLavaService.findAllByCreateUserAndIsValid(userId, "1");
            if (list22.size() > 0) {
                for (HddcWyLavaEntity hddcWyLavaEntity : list22) {
                    HddcFormDataInfoVo hddcFormDataInfoVo = new HddcFormDataInfoVo();
                    hddcFormDataInfoVo.setUuid(hddcWyLavaEntity.getUuid());
                    hddcFormDataInfoVo.setLon(hddcWyLavaEntity.getLon());
                    hddcFormDataInfoVo.setLat(hddcWyLavaEntity.getLat());
                    hddcFormDataInfoVo.setType("22");
                    dataInfoVos.add(hddcFormDataInfoVo);
                }
                //response=RestResponse.succeed(dataInfoVos);
            }
            List<HddcWyVolcanicsamplepointEntity> list23 = hddcWyVolcanicsamplepointService.findAllByCreateUserAndIsValid(userId, "1");
            if (list23.size() > 0) {
                for (HddcWyVolcanicsamplepointEntity hddcWyVolcanicsamplepointEntity : list23) {
                    HddcFormDataInfoVo hddcFormDataInfoVo = new HddcFormDataInfoVo();
                    hddcFormDataInfoVo.setUuid(hddcWyVolcanicsamplepointEntity.getUuid());
                    hddcFormDataInfoVo.setLon(hddcWyVolcanicsamplepointEntity.getLon());
                    hddcFormDataInfoVo.setLat(hddcWyVolcanicsamplepointEntity.getLat());
                    hddcFormDataInfoVo.setType("23");
                    dataInfoVos.add(hddcFormDataInfoVo);
                }
                //response=RestResponse.succeed(dataInfoVos);
            }
            List<HddcWyVolcanicsvypointEntity> list24 = hddcWyVolcanicsvypointService.findAllByCreateUserAndIsValid(userId, "1");
            if (list24.size() > 0) {
                for (HddcWyVolcanicsvypointEntity hddcWyVolcanicsvypointEntity : list24) {
                    HddcFormDataInfoVo hddcFormDataInfoVo = new HddcFormDataInfoVo();
                    hddcFormDataInfoVo.setUuid(hddcWyVolcanicsvypointEntity.getUuid());
                    hddcFormDataInfoVo.setLon(hddcWyVolcanicsvypointEntity.getLon());
                    hddcFormDataInfoVo.setLat(hddcWyVolcanicsvypointEntity.getLat());
                    hddcFormDataInfoVo.setType("24");
                    dataInfoVos.add(hddcFormDataInfoVo);
                }
                //response=RestResponse.succeed(dataInfoVos);
            }
            response = RestResponse.succeed(dataInfoVos);
            return response;
        } catch (Exception e) {
            String errorMessage = "查询失败!";
            log.error(errorMessage, e);
            response = RestResponse.fail(errorMessage);
        }
        return response;
    }

    /**
     * 获取点的详情
     *
     * @param uuid
     * @param type
     * @return
     */
    @GetMapping("/hddcAppFormDataAsInfo")
    public RestResponse findFormDataInfo(String uuid, String type) {
        RestResponse response = null;
        try {
            if ("1".equals(type)) {
                hddcWyGeologicalsvyplanninglineService.getHddcWyGeologicalsvyplanningline(uuid);
            } else if ("2".equals(type)) {
                hddcWyGeologicalsvyplanningptService.getHddcWyGeologicalsvyplanningpt(uuid);
            } else if ("3".equals(type)) {
                hddcWyFaultsvypointService.getHddcWyFaultsvypoint(uuid);
            } else if ("4".equals(type)) {
                hddcWyGeogeomorphysvypointService.getHddcWyGeogeomorphysvypoint(uuid);
            } else if ("5".equals(type)) {
                hddcWyGeologicalsvylineService.getHddcWyGeologicalsvyline(uuid);
            } else if ("6".equals(type)) {
                hddcWyGeologicalsvypointService.getHddcWyGeologicalsvypoint(uuid);
            } else if ("7".equals(type)) {
                hddcWyStratigraphysvypointService.getHddcWyStratigraphysvypoint(uuid);
            } else if ("8".equals(type)) {
                hddcWyTrenchService.getHddcWyTrench(uuid);
            } else if ("9".equals(type)) {
                hddcWyGeomorphysvylineService.getHddcWyGeomorphysvyline(uuid);
            } else if ("10".equals(type)) {
                hddcWyGeomorphysvypointService.getHddcWyGeomorphysvypoint(uuid);
            } else if ("11".equals(type)) {
                hddcWyGeomorphysvyregionService.getHddcWyGeomorphysvyregion(uuid);
            } else if ("12".equals(type)) {
                hddcWyGeomorphysvyreprofService.getHddcWyGeomorphysvyreprof(uuid);
            } else if ("13".equals(type)) {
                hddcWyGeomorphysvysamplepointService.getHddcWyGeomorphysvysamplepoint(uuid);
            } else if ("14".equals(type)) {
                hddcWyGeomorstationService.getHddcWyGeomorstation(uuid);
            } else if ("15".equals(type)) {
                hddcWyDrillholeService.getHddcWyDrillhole(uuid);
            } else if ("16".equals(type)) {
                hddcWySamplepointService.getHddcWySamplepoint(uuid);
            } else if ("17".equals(type)) {
                hddcWyGeophysvylineService.getHddcWyGeophysvyline(uuid);
            } else if ("18".equals(type)) {
                hddcWyGeophysvypointService.getHddcWyGeophysvypoint(uuid);
            } else if ("19".equals(type)) {
                hddcWyGeochemicalsvylineService.getHddcWyGeochemicalsvyline(uuid);
            } else if ("20".equals(type)) {
                hddcWyGeochemicalsvypointService.getHddcWyGeochemicalsvypoint(uuid);
            } else if ("21".equals(type)) {
                hddcWyCraterService.getHddcWyCrater(uuid);
            }
            if ("22".equals(type)) {
                hddcWyLavaService.getHddcWyLava(uuid);
            }
            if ("23".equals(type)) {
                hddcWyVolcanicsamplepointService.getHddcWyVolcanicsamplepoint(uuid);
            }
            if ("24".equals(type)) {
                hddcWyVolcanicsvypointService.getHddcWyVolcanicsvypoint(uuid);
            }
            return response;
        } catch (Exception e) {
            String errorMessage = "获取失败!";
            log.error(errorMessage, e);
            response = RestResponse.fail(errorMessage);
        }
        return response;
    }

    @PostMapping("/hddcWyGeologicalsvyplanninglines")
    public RestResponse saveHddcWyGeologicalsvyplanningline(@RequestBody HddcWyGeologicalsvyplanninglineEntity hddcWyGeologicalsvyplanningline) {
        RestResponse response = null;
        JSONObject json = new JSONObject();
        try {
            hddcWyGeologicalsvyplanninglineService.saveHddcWyGeologicalsvyplanningline(hddcWyGeologicalsvyplanningline);
            json.put("message", "新增成功!");
            response = RestResponse.succeed(json);
        } catch (Exception e) {
            String errorMessage = "新增失败!";
            log.error(errorMessage, e);
            response = RestResponse.fail(errorMessage);
        }
        return response;


    }

    @GetMapping("/hddcWyGeologicalsvyplanninglines/{uuid}")
    public RestResponse getHddcWyGeologicalsvyplanningline(@PathVariable String uuid) {
        RestResponse response = null;
        try {
            HddcWyGeologicalsvyplanninglineEntity hddcWyGeologicalsvyplanningline = hddcWyGeologicalsvyplanninglineService.getHddcWyGeologicalsvyplanningline(uuid);
            response = RestResponse.succeed(hddcWyGeologicalsvyplanningline);
        } catch (Exception e) {
            String errorMessage = "获取失败!";
            log.error(errorMessage, e);
            response = RestResponse.fail(errorMessage);
        }
        return response;
    }

    @PostMapping("/hddcWyGeologicalsvyplanningpts")
    public RestResponse saveHddcWyGeologicalsvyplanningpt(@RequestBody HddcWyGeologicalsvyplanningptEntity hddcWyGeologicalsvyplanningpt) {
        RestResponse response = null;
        JSONObject json = new JSONObject();
        try {
            hddcWyGeologicalsvyplanningptService.saveHddcWyGeologicalsvyplanningpt(hddcWyGeologicalsvyplanningpt);
            json.put("message", "新增成功!");
            response = RestResponse.succeed(json);
        } catch (Exception e) {
            String errorMessage = "新增失败!";
            log.error(errorMessage, e);
            response = RestResponse.fail(errorMessage);
        }
        return response;
    }

    @GetMapping("/hddcWyGeologicalsvyplanningpts/{uuid}")
    public RestResponse getHddcWyGeologicalsvyplanningpt(@PathVariable String uuid) {
        RestResponse response = null;
        try {
            HddcWyGeologicalsvyplanningptEntity hddcWyGeologicalsvyplanningpt = hddcWyGeologicalsvyplanningptService.getHddcWyGeologicalsvyplanningpt(uuid);
            response = RestResponse.succeed(hddcWyGeologicalsvyplanningpt);
        } catch (Exception e) {
            String errorMessage = "获取失败!";
            log.error(errorMessage, e);
            response = RestResponse.fail(errorMessage);
        }
        return response;
    }

    @PostMapping("/hddcWyFaultsvypoints")
    public RestResponse saveHddcWyFaultsvypoint(@RequestBody HddcWyFaultsvypointEntity hddcWyFaultsvypoint) {
        RestResponse response = null;
        JSONObject json = new JSONObject();
        try {
            hddcWyFaultsvypointService.saveHddcWyFaultsvypoint(hddcWyFaultsvypoint);
            json.put("message", "新增成功!");
            response = RestResponse.succeed(json);
        } catch (Exception e) {
            String errorMessage = "新增失败!";
            log.error(errorMessage, e);
            response = RestResponse.fail(errorMessage);
        }
        return response;

    }

    @GetMapping("/hddcWyFaultsvypoints/{uuid}")
    public RestResponse getHddcWyFaultsvypoint(@PathVariable String uuid) {
        RestResponse response = null;
        try {
            HddcWyFaultsvypointEntity hddcWyFaultsvypoint = hddcWyFaultsvypointService.getHddcWyFaultsvypoint(uuid);
            response = RestResponse.succeed(hddcWyFaultsvypoint);
        } catch (Exception e) {
            String errorMessage = "获取失败!";
            log.error(errorMessage, e);
            response = RestResponse.fail(errorMessage);
        }
        return response;
    }

    @PostMapping("/hddcWyGeogeomorphysvypoints")
    public RestResponse saveHddcWyGeogeomorphysvypoint(@RequestBody HddcWyGeogeomorphysvypointEntity hddcWyGeogeomorphysvypoint) {
        RestResponse response = null;
        JSONObject json = new JSONObject();
        try {
            hddcWyGeogeomorphysvypointService.saveHddcWyGeogeomorphysvypoint(hddcWyGeogeomorphysvypoint);
            json.put("message", "新增成功!");
            response = RestResponse.succeed(json);
        } catch (Exception e) {
            String errorMessage = "新增失败!";
            log.error(errorMessage, e);
            response = RestResponse.fail(errorMessage);
        }
        return response;

    }

    @GetMapping("/hddcWyGeogeomorphysvypoints/{uuid}")
    public RestResponse getHddcWyGeogeomorphysvypoint(@PathVariable String uuid) {
        RestResponse response = null;
        try {
            HddcWyGeogeomorphysvypointEntity hddcWyGeogeomorphysvypoint = hddcWyGeogeomorphysvypointService.getHddcWyGeogeomorphysvypoint(uuid);
            response = RestResponse.succeed(hddcWyGeogeomorphysvypoint);
        } catch (Exception e) {
            String errorMessage = "获取失败!";
            log.error(errorMessage, e);
            response = RestResponse.fail(errorMessage);
        }
        return response;
    }

    @PostMapping("/hddcWyGeologicalsvylines")
    public RestResponse saveHddcWyGeologicalsvyline(@RequestBody HddcWyGeologicalsvylineEntity hddcWyGeologicalsvyline) {
        RestResponse response = null;
        JSONObject json = new JSONObject();
        try {
            hddcWyGeologicalsvylineService.saveHddcWyGeologicalsvyline(hddcWyGeologicalsvyline);
            json.put("message", "新增成功!");
            response = RestResponse.succeed(json);
        } catch (Exception e) {
            String errorMessage = "新增失败!";
            log.error(errorMessage, e);
            response = RestResponse.fail(errorMessage);
        }
        return response;

    }

    @GetMapping("/hddcWyGeologicalsvylines/{uuid}")
    public RestResponse getHddcWyGeologicalsvyline(@PathVariable String uuid) {
        RestResponse response = null;
        try {
            HddcWyGeologicalsvylineEntity hddcWyGeologicalsvyline = hddcWyGeologicalsvylineService.getHddcWyGeologicalsvyline(uuid);
            response = RestResponse.succeed(hddcWyGeologicalsvyline);
        } catch (Exception e) {
            String errorMessage = "获取失败!";
            log.error(errorMessage, e);
            response = RestResponse.fail(errorMessage);
        }
        return response;
    }

    @PostMapping("/hddcWyGeologicalsvypoints")
    public RestResponse saveHddcWyGeologicalsvypoint(@RequestBody HddcWyGeologicalsvypointEntity hddcWyGeologicalsvypoint) {
        RestResponse response = null;
        JSONObject json = new JSONObject();
        try {
            hddcWyGeologicalsvypointService.saveHddcWyGeologicalsvypoint(hddcWyGeologicalsvypoint);
            json.put("message", "新增成功!");
            response = RestResponse.succeed(json);
        } catch (Exception e) {
            String errorMessage = "新增失败!";
            log.error(errorMessage, e);
            response = RestResponse.fail(errorMessage);
        }
        return response;

    }

    @GetMapping("/hddcWyGeologicalsvypoints/{uuid}")
    public RestResponse getHddcWyGeologicalsvypoint(@PathVariable String uuid) {
        RestResponse response = null;
        try {
            HddcWyGeologicalsvypointEntity hddcWyGeologicalsvypoint = hddcWyGeologicalsvypointService.getHddcWyGeologicalsvypoint(uuid);
            response = RestResponse.succeed(hddcWyGeologicalsvypoint);
        } catch (Exception e) {
            String errorMessage = "获取失败!";
            log.error(errorMessage, e);
            response = RestResponse.fail(errorMessage);
        }
        return response;
    }

    @PostMapping("/hddcWyStratigraphysvypoints")
    public RestResponse saveHddcWyStratigraphysvypoint(@RequestBody HddcWyStratigraphysvypointEntity hddcWyStratigraphysvypoint) {
        RestResponse response = null;
        JSONObject json = new JSONObject();
        try {
            hddcWyStratigraphysvypointService.saveHddcWyStratigraphysvypoint(hddcWyStratigraphysvypoint);
            json.put("message", "新增成功!");
            response = RestResponse.succeed(json);
        } catch (Exception e) {
            String errorMessage = "新增失败!";
            log.error(errorMessage, e);
            response = RestResponse.fail(errorMessage);
        }
        return response;

    }

    @GetMapping("/hddcWyStratigraphysvypoints/{uuid}")
    public RestResponse getHddcWyStratigraphysvypoint(@PathVariable String uuid) {
        RestResponse response = null;
        try {
            HddcWyStratigraphysvypointEntity hddcWyStratigraphysvypoint = hddcWyStratigraphysvypointService.getHddcWyStratigraphysvypoint(uuid);
            response = RestResponse.succeed(hddcWyStratigraphysvypoint);
        } catch (Exception e) {
            String errorMessage = "获取失败!";
            log.error(errorMessage, e);
            response = RestResponse.fail(errorMessage);
        }
        return response;
    }

    @PostMapping("/hddcWyTrenchs")
    public RestResponse saveHddcWyTrench(@RequestBody HddcWyTrenchEntity hddcWyTrench) {
        RestResponse response = null;
        JSONObject json = new JSONObject();
        try {
            hddcWyTrenchService.saveHddcWyTrench(hddcWyTrench);
            json.put("message", "新增成功!");
            response = RestResponse.succeed(json);
        } catch (Exception e) {
            String errorMessage = "新增失败!";
            log.error(errorMessage, e);
            response = RestResponse.fail(errorMessage);
        }
        return response;

    }

    @GetMapping("/hddcWyTrenchs/{uuid}")
    public RestResponse getHddcWyTrench(@PathVariable String uuid) {
        RestResponse response = null;
        try {
            HddcWyTrenchEntity hddcWyTrench = hddcWyTrenchService.getHddcWyTrench(uuid);
            response = RestResponse.succeed(hddcWyTrench);
        } catch (Exception e) {
            String errorMessage = "获取失败!";
            log.error(errorMessage, e);
            response = RestResponse.fail(errorMessage);
        }
        return response;
    }

    @PostMapping("/hddcWyGeomorphysvylines")
    public RestResponse saveHddcWyGeomorphysvyline(@RequestBody HddcWyGeomorphysvylineEntity hddcWyGeomorphysvyline) {
        RestResponse response = null;
        JSONObject json = new JSONObject();
        try {
            hddcWyGeomorphysvylineService.saveHddcWyGeomorphysvyline(hddcWyGeomorphysvyline);
            json.put("message", "新增成功!");
            response = RestResponse.succeed(json);
        } catch (Exception e) {
            String errorMessage = "新增失败!";
            log.error(errorMessage, e);
            response = RestResponse.fail(errorMessage);
        }
        return response;

    }

    @GetMapping("/hddcWyGeomorphysvylines/{uuid}")
    public RestResponse getHddcWyGeomorphysvyline(@PathVariable String uuid) {
        RestResponse response = null;
        try {
            HddcWyGeomorphysvylineEntity hddcWyGeomorphysvyline = hddcWyGeomorphysvylineService.getHddcWyGeomorphysvyline(uuid);
            response = RestResponse.succeed(hddcWyGeomorphysvyline);
        } catch (Exception e) {
            String errorMessage = "获取失败!";
            log.error(errorMessage, e);
            response = RestResponse.fail(errorMessage);
        }
        return response;
    }

    @PostMapping("/hddcWyGeomorphysvypoints")
    public RestResponse saveHddcWyGeomorphysvypoint(@RequestBody HddcWyGeomorphysvypointEntity hddcWyGeomorphysvypoint) {
        RestResponse response = null;
        JSONObject json = new JSONObject();
        try {
            hddcWyGeomorphysvypointService.saveHddcWyGeomorphysvypoint(hddcWyGeomorphysvypoint);
            json.put("message", "新增成功!");
            response = RestResponse.succeed(json);
        } catch (Exception e) {
            String errorMessage = "新增失败!";
            log.error(errorMessage, e);
            response = RestResponse.fail(errorMessage);
        }
        return response;

    }

    @GetMapping("/hddcWyGeomorphysvypoints/{uuid}")
    public RestResponse getHddcWyGeomorphysvypoint(@PathVariable String uuid) {
        RestResponse response = null;
        try {
            HddcWyGeomorphysvypointEntity hddcWyGeomorphysvypoint = hddcWyGeomorphysvypointService.getHddcWyGeomorphysvypoint(uuid);
            response = RestResponse.succeed(hddcWyGeomorphysvypoint);
        } catch (Exception e) {
            String errorMessage = "获取失败!";
            log.error(errorMessage, e);
            response = RestResponse.fail(errorMessage);
        }
        return response;
    }

    @PostMapping("/hddcWyGeomorphysvyregions")
    public RestResponse saveHddcWyGeomorphysvyregion(@RequestBody HddcWyGeomorphysvyregionEntity hddcWyGeomorphysvyregion) {
        RestResponse response = null;
        JSONObject json = new JSONObject();
        try {
            hddcWyGeomorphysvyregionService.saveHddcWyGeomorphysvyregion(hddcWyGeomorphysvyregion);
            json.put("message", "新增成功!");
            response = RestResponse.succeed(json);
        } catch (Exception e) {
            String errorMessage = "新增失败!";
            log.error(errorMessage, e);
            response = RestResponse.fail(errorMessage);
        }
        return response;

    }

    @GetMapping("/hddcWyGeomorphysvyregions/{uuid}")
    public RestResponse getHddcWyGeomorphysvyregion(@PathVariable String uuid) {
        RestResponse response = null;
        try {
            HddcWyGeomorphysvyregionEntity hddcWyGeomorphysvyregion = hddcWyGeomorphysvyregionService.getHddcWyGeomorphysvyregion(uuid);
            response = RestResponse.succeed(hddcWyGeomorphysvyregion);
        } catch (Exception e) {
            String errorMessage = "获取失败!";
            log.error(errorMessage, e);
            response = RestResponse.fail(errorMessage);
        }
        return response;
    }

    @PostMapping("/hddcWyGeomorphysvyreprofs")
    public RestResponse saveHddcWyGeomorphysvyreprof(@RequestBody HddcWyGeomorphysvyreprofEntity hddcWyGeomorphysvyreprof) {
        RestResponse response = null;
        JSONObject json = new JSONObject();
        try {
            hddcWyGeomorphysvyreprofService.saveHddcWyGeomorphysvyreprof(hddcWyGeomorphysvyreprof);
            json.put("message", "新增成功!");
            response = RestResponse.succeed(json);
        } catch (Exception e) {
            String errorMessage = "新增失败!";
            log.error(errorMessage, e);
            response = RestResponse.fail(errorMessage);
        }
        return response;

    }

    @GetMapping("/hddcWyGeomorphysvyreprofs/{uuid}")
    public RestResponse getHddcWyGeomorphysvyreprof(@PathVariable String uuid) {
        RestResponse response = null;
        try {
            HddcWyGeomorphysvyreprofEntity hddcWyGeomorphysvyreprof = hddcWyGeomorphysvyreprofService.getHddcWyGeomorphysvyreprof(uuid);
            response = RestResponse.succeed(hddcWyGeomorphysvyreprof);
        } catch (Exception e) {
            String errorMessage = "获取失败!";
            log.error(errorMessage, e);
            response = RestResponse.fail(errorMessage);
        }
        return response;
    }

    @PostMapping("/hddcWyGeomorphysvysamplepoints")
    public RestResponse saveHddcWyGeomorphysvysamplepoint(@RequestBody HddcWyGeomorphysvysamplepointEntity hddcWyGeomorphysvysamplepoint) {
        RestResponse response = null;
        JSONObject json = new JSONObject();
        try {
            hddcWyGeomorphysvysamplepointService.saveHddcWyGeomorphysvysamplepoint(hddcWyGeomorphysvysamplepoint);
            json.put("message", "新增成功!");
            response = RestResponse.succeed(json);
        } catch (Exception e) {
            String errorMessage = "新增失败!";
            log.error(errorMessage, e);
            response = RestResponse.fail(errorMessage);
        }
        return response;

    }

    @GetMapping("/hddcWyGeomorphysvysamplepoints/{uuid}")
    public RestResponse getHddcWyGeomorphysvysamplepoint(@PathVariable String uuid) {
        RestResponse response = null;
        try {
            HddcWyGeomorphysvysamplepointEntity hddcWyGeomorphysvysamplepoint = hddcWyGeomorphysvysamplepointService.getHddcWyGeomorphysvysamplepoint(uuid);
            response = RestResponse.succeed(hddcWyGeomorphysvysamplepoint);
        } catch (Exception e) {
            String errorMessage = "获取失败!";
            log.error(errorMessage, e);
            response = RestResponse.fail(errorMessage);
        }
        return response;
    }

    @PostMapping("/hddcWyGeomorstations")
    public RestResponse saveHddcWyGeomorstation(@RequestBody HddcWyGeomorstationEntity hddcWyGeomorstation) {
        RestResponse response = null;
        JSONObject json = new JSONObject();
        try {
            hddcWyGeomorstationService.saveHddcWyGeomorstation(hddcWyGeomorstation);
            json.put("message", "新增成功!");
            response = RestResponse.succeed(json);
        } catch (Exception e) {
            String errorMessage = "新增失败!";
            log.error(errorMessage, e);
            response = RestResponse.fail(errorMessage);
        }
        return response;

    }

    @GetMapping("/hddcWyGeomorstations/{uuid}")
    public RestResponse getHddcWyGeomorstation(@PathVariable String uuid) {
        RestResponse response = null;
        try {
            HddcWyGeomorstationEntity hddcWyGeomorstation = hddcWyGeomorstationService.getHddcWyGeomorstation(uuid);
            response = RestResponse.succeed(hddcWyGeomorstation);
        } catch (Exception e) {
            String errorMessage = "获取失败!";
            log.error(errorMessage, e);
            response = RestResponse.fail(errorMessage);
        }
        return response;
    }

    @PostMapping("/hddcWyDrillholes")
    public RestResponse saveHddcWyDrillhole(@RequestBody HddcWyDrillholeEntity hddcWyDrillhole) {
        RestResponse response = null;
        JSONObject json = new JSONObject();
        try {
            hddcWyDrillholeService.saveHddcWyDrillhole(hddcWyDrillhole);
            json.put("message", "新增成功!");
            response = RestResponse.succeed(json);
        } catch (Exception e) {
            String errorMessage = "新增失败!";
            log.error(errorMessage, e);
            response = RestResponse.fail(errorMessage);
        }
        return response;

    }

    @GetMapping("/hddcWyDrillholes/{uuid}")
    public RestResponse getHddcWyDrillhole(@PathVariable String uuid) {
        RestResponse response = null;
        try {
            HddcWyDrillholeEntity hddcWyDrillhole = hddcWyDrillholeService.getHddcWyDrillhole(uuid);
            response = RestResponse.succeed(hddcWyDrillhole);
        } catch (Exception e) {
            String errorMessage = "获取失败!";
            log.error(errorMessage, e);
            response = RestResponse.fail(errorMessage);
        }
        return response;
    }

    @PostMapping("/hddcWySamplepoints")
    public RestResponse saveHddcWySamplepoint(@RequestBody HddcWySamplepointEntity hddcWySamplepoint) {
        RestResponse response = null;
        JSONObject json = new JSONObject();
        try {
            hddcWySamplepointService.saveHddcWySamplepoint(hddcWySamplepoint);
            json.put("message", "新增成功!");
            response = RestResponse.succeed(json);
        } catch (Exception e) {
            String errorMessage = "新增失败!";
            log.error(errorMessage, e);
            response = RestResponse.fail(errorMessage);
        }
        return response;

    }

    @GetMapping("/hddcWySamplepoints/{uuid}")
    public RestResponse getHddcWySamplepoint(@PathVariable String uuid) {
        RestResponse response = null;
        try {
            HddcWySamplepointEntity hddcWySamplepoint = hddcWySamplepointService.getHddcWySamplepoint(uuid);
            response = RestResponse.succeed(hddcWySamplepoint);
        } catch (Exception e) {
            String errorMessage = "获取失败!";
            log.error(errorMessage, e);
            response = RestResponse.fail(errorMessage);
        }
        return response;
    }

    @PostMapping("/hddcWyGeophysvylines")
    public RestResponse saveHddcWyGeophysvyline(@RequestBody HddcWyGeophysvylineEntity hddcWyGeophysvyline) {
        RestResponse response = null;
        JSONObject json = new JSONObject();
        try {
            hddcWyGeophysvylineService.saveHddcWyGeophysvyline(hddcWyGeophysvyline);
            json.put("message", "新增成功!");
            response = RestResponse.succeed(json);
        } catch (Exception e) {
            String errorMessage = "新增失败!";
            log.error(errorMessage, e);
            response = RestResponse.fail(errorMessage);
        }
        return response;

    }

    @GetMapping("/hddcWyGeophysvylines/{uuid}")
    public RestResponse getHddcWyGeophysvyline(@PathVariable String uuid) {
        RestResponse response = null;
        try {
            HddcWyGeophysvylineEntity hddcWyGeophysvyline = hddcWyGeophysvylineService.getHddcWyGeophysvyline(uuid);
            response = RestResponse.succeed(hddcWyGeophysvyline);
        } catch (Exception e) {
            String errorMessage = "获取失败!";
            log.error(errorMessage, e);
            response = RestResponse.fail(errorMessage);
        }
        return response;
    }

    @PostMapping("/hddcWyGeophysvypoints")
    public RestResponse saveHddcWyGeophysvypoint(@RequestBody HddcWyGeophysvypointEntity hddcWyGeophysvypoint) {
        RestResponse response = null;
        JSONObject json = new JSONObject();
        try {
            hddcWyGeophysvypointService.saveHddcWyGeophysvypoint(hddcWyGeophysvypoint);
            json.put("message", "新增成功!");
            response = RestResponse.succeed(json);
        } catch (Exception e) {
            String errorMessage = "新增失败!";
            log.error(errorMessage, e);
            response = RestResponse.fail(errorMessage);
        }
        return response;

    }

    @GetMapping("/hddcWyGeophysvypoints/{uuid}")
    public RestResponse getHddcWyGeophysvypoint(@PathVariable String uuid) {
        RestResponse response = null;
        try {
            HddcWyGeophysvypointEntity hddcWyGeophysvypoint = hddcWyGeophysvypointService.getHddcWyGeophysvypoint(uuid);
            response = RestResponse.succeed(hddcWyGeophysvypoint);
        } catch (Exception e) {
            String errorMessage = "获取失败!";
            log.error(errorMessage, e);
            response = RestResponse.fail(errorMessage);
        }
        return response;
    }

    @PostMapping("/hddcWyGeochemicalsvylines")
    public RestResponse saveHddcWyGeochemicalsvyline(@RequestBody HddcWyGeochemicalsvylineEntity hddcWyGeochemicalsvyline) {
        RestResponse response = null;
        JSONObject json = new JSONObject();
        try {
            hddcWyGeochemicalsvylineService.saveHddcWyGeochemicalsvyline(hddcWyGeochemicalsvyline);
            json.put("message", "新增成功!");
            response = RestResponse.succeed(json);
        } catch (Exception e) {
            String errorMessage = "新增失败!";
            log.error(errorMessage, e);
            response = RestResponse.fail(errorMessage);
        }
        return response;

    }

    @GetMapping("/hddcWyGeochemicalsvylines/{uuid}")
    public RestResponse getHddcWyGeochemicalsvyline(@PathVariable String uuid) {
        RestResponse response = null;
        try {
            HddcWyGeochemicalsvylineEntity hddcWyGeochemicalsvyline = hddcWyGeochemicalsvylineService.getHddcWyGeochemicalsvyline(uuid);
            response = RestResponse.succeed(hddcWyGeochemicalsvyline);
        } catch (Exception e) {
            String errorMessage = "获取失败!";
            log.error(errorMessage, e);
            response = RestResponse.fail(errorMessage);
        }
        return response;
    }

    @PostMapping("/hddcWyGeochemicalsvypoints")
    public RestResponse saveHddcWyGeochemicalsvypoint(@RequestBody HddcWyGeochemicalsvypointEntity hddcWyGeochemicalsvypoint) {
        RestResponse response = null;
        JSONObject json = new JSONObject();
        try {
            hddcWyGeochemicalsvypointService.saveHddcWyGeochemicalsvypoint(hddcWyGeochemicalsvypoint);
            json.put("message", "新增成功!");
            response = RestResponse.succeed(json);
        } catch (Exception e) {
            String errorMessage = "新增失败!";
            log.error(errorMessage, e);
            response = RestResponse.fail(errorMessage);
        }
        return response;

    }

    @GetMapping("/hddcWyGeochemicalsvypoints/{uuid}")
    public RestResponse getHddcWyGeochemicalsvypoint(@PathVariable String uuid) {
        RestResponse response = null;
        try {
            HddcWyGeochemicalsvypointEntity hddcWyGeochemicalsvypoint = hddcWyGeochemicalsvypointService.getHddcWyGeochemicalsvypoint(uuid);
            response = RestResponse.succeed(hddcWyGeochemicalsvypoint);
        } catch (Exception e) {
            String errorMessage = "获取失败!";
            log.error(errorMessage, e);
            response = RestResponse.fail(errorMessage);
        }
        return response;
    }

    @PostMapping("/hddcWyCraters")
    public RestResponse saveHddcWyCrater(@RequestBody HddcWyCraterEntity hddcWyCrater) {
        RestResponse response = null;
        JSONObject json = new JSONObject();
        try {
            hddcWyCraterService.saveHddcWyCrater(hddcWyCrater);
            json.put("message", "新增成功!");
            response = RestResponse.succeed(json);
        } catch (Exception e) {
            String errorMessage = "新增失败!";
            log.error(errorMessage, e);
            response = RestResponse.fail(errorMessage);
        }
        return response;

    }

    @GetMapping("/hddcWyCraters/{uuid}")
    public RestResponse getHddcWyCrater(@PathVariable String uuid) {
        RestResponse response = null;
        try {
            HddcWyCraterEntity hddcWyCrater = hddcWyCraterService.getHddcWyCrater(uuid);
            response = RestResponse.succeed(hddcWyCrater);
        } catch (Exception e) {
            String errorMessage = "获取失败!";
            log.error(errorMessage, e);
            response = RestResponse.fail(errorMessage);
        }
        return response;
    }

    @PostMapping("/hddcWyLavas")
    public RestResponse saveHddcWyLava(@RequestBody HddcWyLavaEntity hddcWyLava) {
        RestResponse response = null;
        JSONObject json = new JSONObject();
        try {
            hddcWyLavaService.saveHddcWyLava(hddcWyLava);
            json.put("message", "新增成功!");
            response = RestResponse.succeed(json);
        } catch (Exception e) {
            String errorMessage = "新增失败!";
            log.error(errorMessage, e);
            response = RestResponse.fail(errorMessage);
        }
        return response;

    }

    @GetMapping("/hddcWyLavas/{uuid}")
    public RestResponse getHddcWyLava(@PathVariable String uuid) {
        RestResponse response = null;
        try {
            HddcWyLavaEntity hddcWyLava = hddcWyLavaService.getHddcWyLava(uuid);
            response = RestResponse.succeed(hddcWyLava);
        } catch (Exception e) {
            String errorMessage = "获取失败!";
            log.error(errorMessage, e);
            response = RestResponse.fail(errorMessage);
        }
        return response;
    }

    @PostMapping("/hddcWyVolcanicsamplepoints")
    public RestResponse saveHddcWyVolcanicsamplepoint(@RequestBody HddcWyVolcanicsamplepointEntity hddcWyVolcanicsamplepoint) {
        RestResponse response = null;
        JSONObject json = new JSONObject();
        try {
            hddcWyVolcanicsamplepointService.saveHddcWyVolcanicsamplepoint(hddcWyVolcanicsamplepoint);
            json.put("message", "新增成功!");
            response = RestResponse.succeed(json);
        } catch (Exception e) {
            String errorMessage = "新增失败!";
            log.error(errorMessage, e);
            response = RestResponse.fail(errorMessage);
        }
        return response;

    }

    @GetMapping("/hddcWyVolcanicsamplepoints/{uuid}")
    public RestResponse getHddcWyVolcanicsamplepoint(@PathVariable String uuid) {
        RestResponse response = null;
        try {
            HddcWyVolcanicsamplepointEntity hddcWyVolcanicsamplepoint = hddcWyVolcanicsamplepointService.getHddcWyVolcanicsamplepoint(uuid);
            response = RestResponse.succeed(hddcWyVolcanicsamplepoint);
        } catch (Exception e) {
            String errorMessage = "获取失败!";
            log.error(errorMessage, e);
            response = RestResponse.fail(errorMessage);
        }
        return response;
    }

    @PostMapping("/hddcWyVolcanicsvypoints")
    public RestResponse saveHddcWyVolcanicsvypoint(@RequestBody HddcWyVolcanicsvypointEntity hddcWyVolcanicsvypoint) {
        RestResponse response = null;
        JSONObject json = new JSONObject();
        try {
            hddcWyVolcanicsvypointService.saveHddcWyVolcanicsvypoint(hddcWyVolcanicsvypoint);
            json.put("message", "新增成功!");
            response = RestResponse.succeed(json);
        } catch (Exception e) {
            String errorMessage = "新增失败!";
            log.error(errorMessage, e);
            response = RestResponse.fail(errorMessage);
        }
        return response;

    }

    @GetMapping("/hddcWyVolcanicsvypoints/{uuid}")
    public RestResponse getHddcWyVolcanicsvypoint(@PathVariable String uuid) {
        RestResponse response = null;
        try {
            HddcWyVolcanicsvypointEntity hddcWyVolcanicsvypoint = hddcWyVolcanicsvypointService.getHddcWyVolcanicsvypoint(uuid);
            response = RestResponse.succeed(hddcWyVolcanicsvypoint);
        } catch (Exception e) {
            String errorMessage = "获取失败!";
            log.error(errorMessage, e);
            response = RestResponse.fail(errorMessage);
        }
        return response;
    }


    @GetMapping("/getValidDictItemsByDictCode/{dictCode}")
    public RestResponse getValidDictItemsByDictCode(@PathVariable String dictCode) {
        RestResponse restResponse = null;
        try {
            restResponse = RestResponse.succeed(hddcWyGeophysvylineService.getValidDictItemsByDictCode(dictCode));
        } catch (Exception e) {
            String errorMsg = "字典项获取失败!";
            log.error(errorMsg, e);
            restResponse = RestResponse.fail(errorMsg);
        }
        return restResponse;
    }

}
